3.72 \(\int \frac{\cos ^4(a+b x^n)}{x} \, dx\)

Optimal. Leaf size=79 \[ \frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}+\frac{\cos (4 a) \text{CosIntegral}\left (4 b x^n\right )}{8 n}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}-\frac{\sin (4 a) \text{Si}\left (4 b x^n\right )}{8 n}+\frac{3 \log (x)}{8} \]

[Out]

(Cos[2*a]*CosIntegral[2*b*x^n])/(2*n) + (Cos[4*a]*CosIntegral[4*b*x^n])/(8*n) + (3*Log[x])/8 - (Sin[2*a]*SinIn
tegral[2*b*x^n])/(2*n) - (Sin[4*a]*SinIntegral[4*b*x^n])/(8*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0940672, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3426, 3378, 3376, 3375} \[ \frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}+\frac{\cos (4 a) \text{CosIntegral}\left (4 b x^n\right )}{8 n}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}-\frac{\sin (4 a) \text{Si}\left (4 b x^n\right )}{8 n}+\frac{3 \log (x)}{8} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^n]^4/x,x]

[Out]

(Cos[2*a]*CosIntegral[2*b*x^n])/(2*n) + (Cos[4*a]*CosIntegral[4*b*x^n])/(8*n) + (3*Log[x])/8 - (Sin[2*a]*SinIn
tegral[2*b*x^n])/(2*n) - (Sin[4*a]*SinIntegral[4*b*x^n])/(8*n)

Rule 3426

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rubi steps

\begin{align*} \int \frac{\cos ^4\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac{3}{8 x}+\frac{\cos \left (2 a+2 b x^n\right )}{2 x}+\frac{\cos \left (4 a+4 b x^n\right )}{8 x}\right ) \, dx\\ &=\frac{3 \log (x)}{8}+\frac{1}{8} \int \frac{\cos \left (4 a+4 b x^n\right )}{x} \, dx+\frac{1}{2} \int \frac{\cos \left (2 a+2 b x^n\right )}{x} \, dx\\ &=\frac{3 \log (x)}{8}+\frac{1}{2} \cos (2 a) \int \frac{\cos \left (2 b x^n\right )}{x} \, dx+\frac{1}{8} \cos (4 a) \int \frac{\cos \left (4 b x^n\right )}{x} \, dx-\frac{1}{2} \sin (2 a) \int \frac{\sin \left (2 b x^n\right )}{x} \, dx-\frac{1}{8} \sin (4 a) \int \frac{\sin \left (4 b x^n\right )}{x} \, dx\\ &=\frac{\cos (2 a) \text{Ci}\left (2 b x^n\right )}{2 n}+\frac{\cos (4 a) \text{Ci}\left (4 b x^n\right )}{8 n}+\frac{3 \log (x)}{8}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}-\frac{\sin (4 a) \text{Si}\left (4 b x^n\right )}{8 n}\\ \end{align*}

Mathematica [A]  time = 0.14085, size = 66, normalized size = 0.84 \[ \frac{4 \cos (2 a) \text{CosIntegral}\left (2 b x^n\right )+\cos (4 a) \text{CosIntegral}\left (4 b x^n\right )-4 \sin (2 a) \text{Si}\left (2 b x^n\right )-\sin (4 a) \text{Si}\left (4 b x^n\right )}{8 n}+\frac{3 \log (x)}{8} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^n]^4/x,x]

[Out]

(3*Log[x])/8 + (4*Cos[2*a]*CosIntegral[2*b*x^n] + Cos[4*a]*CosIntegral[4*b*x^n] - 4*Sin[2*a]*SinIntegral[2*b*x
^n] - Sin[4*a]*SinIntegral[4*b*x^n])/(8*n)

________________________________________________________________________________________

Maple [A]  time = 0.039, size = 77, normalized size = 1. \begin{align*} -{\frac{{\it Si} \left ( 4\,b{x}^{n} \right ) \sin \left ( 4\,a \right ) }{8\,n}}+{\frac{{\it Ci} \left ( 4\,b{x}^{n} \right ) \cos \left ( 4\,a \right ) }{8\,n}}-{\frac{{\it Si} \left ( 2\,b{x}^{n} \right ) \sin \left ( 2\,a \right ) }{2\,n}}+{\frac{{\it Ci} \left ( 2\,b{x}^{n} \right ) \cos \left ( 2\,a \right ) }{2\,n}}+{\frac{3\,\ln \left ( b{x}^{n} \right ) }{8\,n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*x^n)^4/x,x)

[Out]

-1/8*Si(4*b*x^n)*sin(4*a)/n+1/8*Ci(4*b*x^n)*cos(4*a)/n-1/2*Si(2*b*x^n)*sin(2*a)/n+1/2*Ci(2*b*x^n)*cos(2*a)/n+3
/8/n*ln(b*x^n)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^4/x,x, algorithm="maxima")

[Out]

Exception raised: IndexError

________________________________________________________________________________________

Fricas [A]  time = 2.02452, size = 309, normalized size = 3.91 \begin{align*} \frac{\cos \left (4 \, a\right ) \operatorname{Ci}\left (4 \, b x^{n}\right ) + 4 \, \cos \left (2 \, a\right ) \operatorname{Ci}\left (2 \, b x^{n}\right ) + 4 \, \cos \left (2 \, a\right ) \operatorname{Ci}\left (-2 \, b x^{n}\right ) + \cos \left (4 \, a\right ) \operatorname{Ci}\left (-4 \, b x^{n}\right ) + 6 \, n \log \left (x\right ) - 2 \, \sin \left (4 \, a\right ) \operatorname{Si}\left (4 \, b x^{n}\right ) - 8 \, \sin \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x^{n}\right )}{16 \, n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^4/x,x, algorithm="fricas")

[Out]

1/16*(cos(4*a)*cos_integral(4*b*x^n) + 4*cos(2*a)*cos_integral(2*b*x^n) + 4*cos(2*a)*cos_integral(-2*b*x^n) +
cos(4*a)*cos_integral(-4*b*x^n) + 6*n*log(x) - 2*sin(4*a)*sin_integral(4*b*x^n) - 8*sin(2*a)*sin_integral(2*b*
x^n))/n

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{4}{\left (a + b x^{n} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x**n)**4/x,x)

[Out]

Integral(cos(a + b*x**n)**4/x, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (b x^{n} + a\right )^{4}}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*x^n)^4/x,x, algorithm="giac")

[Out]

integrate(cos(b*x^n + a)^4/x, x)